<?php
$title = 'Add Product Highlight';
if(!empty($product['id'])){
	$title = 'Edit Product Highlight';
}?>
<div id="page-heading"><input type="button" value="Back to Product Highlight" style="float: right;" id="admin-add-product-highlight"><h1><?php echo $title;?></h1></div>

<form action="<?php echo site_url('admin/save_product_highlight'); ?>" method="post" enctype="multipart/form-data">
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="<?php echo config_item('asset'),'admin/';?>images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="2" class="sized"><img src="<?php echo config_item('asset'),'admin/';?>images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">
	
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr valign="top">
	<td align="center">
		<?php
		if (!empty($product['pic'])) {
			?>
			<img src="<?php echo config_item('asset'),'img/product/',$product['pic'] ?>" width="100%">
			<br><br><br>
			<?php
		}
		?>
		<!-- start id-form -->
		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
			<th valign="top">Title:</th>
			<?php if (!empty($product['id'])): ?>
				<input type="hidden" name="id" value="<?php echo $product['id']; ?>" id="id">
			<?php endif ?>
			<td><input type="text" class="inp-form" id="title" name="title" value="<?php echo element('title', $product) ?>" /></td>
			<td></td>
		</tr>
		<tr>
			<th valign="top">Link:</th>
			<td><input type="text" class="inp-form" id="link" name="link" value="<?php echo element('link', $product) ?>" /></td>
			<td>
				<!--<div class="error-left"></div>
			<div class="error-inner">This field is required.</div> -->
			</td>
		</tr>
	<tr>
	<th>Image 1:</th>
	<td><input type="file" class="file_1" id="pic" name="pic" /></td>
	<td>
	
	</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td valign="top">
			<input type="submit" value="save_product_highlight" class="form-submit" name="save_product_highlight"/>
<!--			<input type="reset" value="" class="form-reset"  /> -->
		</td>
		<td></td>
	</tr>
	</table>
	<!-- end id-form  -->

	</td>
</tr>
<tr>
</table>
 
<div class="clear"></div>
 

</div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>

</form>
<script type="text/javascript">
$('#admin-add-product-highlight').click(function(){
	window.location = '<?php echo site_url('admin/product_highlight');?>';
});
</script>